<html>
	@include('Home.public.include')
		<body bgcolor="#f8f8f8">
			<!--顶部logo-->
			<div class="headlogo">
				<div class="logo"><img src="{{asset('Home/login/huaweiLogo.png')}}"></div>
				<div class="logotext">|</div>
				<div class="logotext">&nbsp;华为商城</div>
			</div>
			<div class="body">
				<div class="bgimage"></div>
				<form class="login layui-form">
					<div class="loginwelcome">欢迎登录华为帐号</div>
					<div class="form">
						<div>
							<input type="text" name="username" class="input1" placeholder="账号（手机/邮箱）"><br />
							<input type="password" name="password" class="input1" placeholder="密码"><br />
							<div class="yzmdiv"><input type="text" name="yzm1" class="input2" placeholder="不区分大小写"><img src="{{url('home/text/3')}}" alt='' onclick="this.src='{{url('home/text/3')}}?'+Math.random()"> </div>
							<div class="remember"><label><input type="radio" name="">  记住登录账号</label></div>
							<div class="forget">忘记密码？</div>
						</div>
					</div>
					<div class="clear"></div>
					<hr / >
					<button class="loginan" lay-submit lay-filter='login'>登录</button>
					<div class="zhuce">您还没有华为账号吧？   <a href="{{url('home/register')}}">免费注册</a></div>
					<div class="text">华为帐号是您用于访问所有华为服务的帐号。使用华为帐号登录后，您将可以使用云服务、华为商城、花粉俱乐部、应用市场、EMUI产品、华为网盘和开发者联盟。</div>
				</form>
			</div>
			<hr / class="line">
 			<div class="footcopy">华为隐私政策 最终用户许可协议 | 常见问题</div> 
 			<div class="footcopy">Copyright©2011-2016 华为技术有限公司 版权所有 保留一切权利</div> 
 			<div class="footcopy">苏B2-20070200号 | 苏ICP备09062682号-9</div> 
		<body>
</html>
<script type="text/javascript">
	layui.use(['form'],function(){
		$ = layui.jquery;
		var form = layui.form();

		//jian ting ti jiao
		form.on('submit(login)',function(data){
			layer.load(2);
			var obj = data.field;
			$.ajax({
				 headers: {
			            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
			        },
			        url:'/home/dologin',
			        type:'post',
			        data:{username:obj.username,password:obj.password,code:obj.yzm1},
			        success:function(data){
			        	layer.closeAll('loading');
			        	 if(data.code){
			        	 	window.location.href='shouye';
			        	 }else{
			        	 	layer.msg(data.info,{icon:2});
			        	 }
			        }
			});
			return false;
		})
	});
</script>
